package com.ruoyi.jiuzai.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.jiuzai.mapper.BaofeimingxiMapper;
import com.ruoyi.jiuzai.domain.Baofeimingxi;
import com.ruoyi.jiuzai.service.IBaofeimingxiService;

/**
 * 物资报废和回收中间表Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-02
 */
@Service
public class BaofeimingxiServiceImpl implements IBaofeimingxiService 
{
    @Autowired
    private BaofeimingxiMapper baofeimingxiMapper;

    /**
     * 新增报废明细时，减少对应物资数量
     */


    /**
     * 查询物资报废和回收中间表
     * 
     * @param baomingId 物资报废和回收中间表主键
     * @return 物资报废和回收中间表
     */
    @Override
    public Baofeimingxi selectBaofeimingxiByBaomingId(Long baomingId)
    {
        return baofeimingxiMapper.selectBaofeimingxiByBaomingId(baomingId);
    }

    /**
     * 查询物资报废和回收中间表列表
     * 
     * @param baofeimingxi 物资报废和回收中间表
     * @return 物资报废和回收中间表
     */
    @Override
    public List<Baofeimingxi> selectBaofeimingxiList(Baofeimingxi baofeimingxi)
    {
        return baofeimingxiMapper.selectBaofeimingxiList(baofeimingxi);
    }

    /**
     * 新增物资报废和回收中间表
     * 
     * @param baofeimingxi 物资报废和回收中间表
     * @return 结果
     */
    @Override
    public int insertBaofeimingxi(Baofeimingxi baofeimingxi)
    {
        return baofeimingxiMapper.insertBaofeimingxi(baofeimingxi);
    }

    /**
     * 修改物资报废和回收中间表
     * 
     * @param baofeimingxi 物资报废和回收中间表
     * @return 结果
     */
    @Override
    public int updateBaofeimingxi(Baofeimingxi baofeimingxi)
    {
        return baofeimingxiMapper.updateBaofeimingxi(baofeimingxi);
    }

    /**
     * 批量删除物资报废和回收中间表
     * 
     * @param baomingIds 需要删除的物资报废和回收中间表主键
     * @return 结果
     */
    @Override
    public int deleteBaofeimingxiByBaomingIds(Long[] baomingIds)
    {
        return baofeimingxiMapper.deleteBaofeimingxiByBaomingIds(baomingIds);
    }

    /**
     * 删除物资报废和回收中间表信息
     * 
     * @param baomingId 物资报废和回收中间表主键
     * @return 结果
     */
    @Override
    public int deleteBaofeimingxiByBaomingId(Long baomingId)
    {
        return baofeimingxiMapper.deleteBaofeimingxiByBaomingId(baomingId);
    }
}
